// 导入Player脚本
import player from "./Player";
const {ccclass, property} = cc._decorator;

@ccclass
export default class Skill_ATK extends cc.Component {

    @property({displayName: "player脚本所在节点", tooltip: "player脚本所在节点", type: player})
    player: player = null;

    @property({displayName: "技能攻击力", tooltip: "技能攻击力，在这里改攻击力是没有用的，到脚本里来看", type: cc.Float})
    ATK: number = 500;

    @property({displayName: "倍数", tooltip: "技能攻击力是角色普攻攻击力的几倍？", type: cc.Float})
    M: number = 3;

    update () {
        // 技能攻击力为普攻 3 倍
        this.ATK = this.player.ATK * this.M;
        // cc.log("雷电技能攻击力为：" + this.ATK, "角色攻击力" + this.player.ATK, "倍数" + this.M);
    }

}
